﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UserAddCounty.aspx.cs" Inherits="HNQXYJ.HN_User.UserAddCounty" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
      <script src="../Scripts/jquery-1.5.1.min.js" type="text/javascript"></script>
     <link href="../CSS/public.css" rel="stylesheet" type="text/css" />
    <link href="../CSS/SimpleContent.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        $(function () {

            //检查用户名是否存在
            $("#txtUserName").focusout(function () {
                var username =$(this).val();

                $.post("../Bll/UsersAsh.ashx", { "action": "IsUserName", "username": username }, function (data, status) {
                    if (status == "success") {
                        
                        var result = data;
                        if (result == "ok") {
                            $("#lbUserName").html("该用户已存在");
                            $("#txtUserName").focus();
                            return;
                        }
                    }
                });
            });


        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <table width="100%" border="0" cellspacing="0" cellpadding="0" height="610" >
                    <tr>
                        <td class="rtbg">
                            <span> 添加新用户 &nbsp;》
                              </span>
                        </td>
                    </tr>
                    <tr>
                        <td  class="rbg" valign="top" align="center"  style="padding-top:20px">
                            
                             <table class="dataList" cellpadding="0" cellspacing="0" width="97%">
                                    <caption>添加新用户</caption>
                                      <tr>
                                        <td class="Graybgr" width="10%">用户名称：</td>
                                        <td class="Lightbluebg" width="90%">
                                          <asp:TextBox ID="txtUserName" runat="server"  CssClass="input150"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                                ControlToValidate="txtUserName" ErrorMessage="*" ValidationGroup="xz"></asp:RequiredFieldValidator>
                                            <asp:Label ID="lbUserName" runat="server" Text="" style="color: #FF0000"></asp:Label>
                                          </td>
                                      </tr>
                                      <tr>
                                        <td class="Graybgr" width="10%">用户密码：</td>
                                        <td class="Lightbluebg" width="90%">
                                           <asp:TextBox ID="txtPwd" runat="server"  CssClass="input150" TextMode="Password"></asp:TextBox>  
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                                                ControlToValidate="txtPwd" ErrorMessage="*" ValidationGroup="xz"></asp:RequiredFieldValidator>
                                        </td>
                                      </tr>
                                      <tr>
                                        <td class="Graybgr">真实姓名：</td>
                                        <td class="Lightbluebg" >
                                            <asp:TextBox ID="txtTrueName" runat="server"  CssClass="input150"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                                                ControlToValidate="txtTrueName" ErrorMessage="*" ValidationGroup="xz"></asp:RequiredFieldValidator>
                                        </td>
                                      </tr>
                                      <tr>
                                        <td class="Graybgr">
                                           用户级别：</td>
                                        <td class="Lightbluebg">
                                            <asp:TextBox ID="txtRankName" runat="server"  CssClass="input150" ReadOnly="true"></asp:TextBox>
                                        </td>
                                      </tr>
                                       
                                       <tr>
                                           <td class="Graybgr">联系方式：</td>
                                           <td class="Lightbluebg" >
                                            <asp:TextBox ID="txtTouchMehtod" runat="server"  Width="396px" CssClass="input150"></asp:TextBox>
                                               <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" 
                                                   ControlToValidate="txtTouchMehtod" ErrorMessage="*" ValidationGroup="xz"></asp:RequiredFieldValidator>
                                            </td> 
                                      </tr>     
                                       <tr>
                                           <td class="Graybgr">补充说明：</td>
                                           <td class="Lightbluebg" >
                                             <asp:TextBox ID="txtNotes" runat="server" TextMode="MultiLine" Height="56px" 
                                                   Width="396px"  Text="无" ></asp:TextBox>
                      <asp:Label ID="Label1" runat="server" ForeColor="Red"></asp:Label>
                                            </td> 
                                      </tr>                                           
                                      <tfoot>            
                                        <tr>  
                                           <td colspan="2"  style=" text-align:left;"> &nbsp;&nbsp;&nbsp; 
                                               <asp:ImageButton ID="reset" ImageUrl="../img/fh.gif" runat="server" 
                                                   onclick="reset_Click" /> 
                                               &nbsp;&nbsp;&nbsp; 
                                               <asp:ImageButton ID="add" ImageUrl="../images/xz.gif" runat="server" 
                                                   onclick="add_Click" style="height: 23px" ValidationGroup="xz" /> 
                                           &nbsp;
                                               </td>
                                        </tr>
                                      </tfoot>
                               </table>
                         </td>
                     </tr>

              </table>
   
    <input id="HidCountyCode" type="hidden"  value="" runat="server" />
    </form>
</body>
</html>
